
package View;

import java.awt.Dimension;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;

/**
 * @author TNT
 */

public class FormHeThong extends JDialog{
    private JPanel bang_nhan, bang_dai, bang_nut;
    private JLabel nhan_tai_khoan, nhan_mat_khau;
    private JTextField dai_tai_khoan;
    private JPasswordField dai_mat_khau;
    private JButton nut_ok, nut_xoa;

    public FormHeThong() {
        nhan_tai_khoan = new JLabel("Tai Khoan:  ");
        nhan_mat_khau = new JLabel("Mat Khau:  ");
        dai_tai_khoan = new JTextField(12);
        dai_mat_khau = new JPasswordField(12);
        nut_ok = new JButton("OK");
        nut_xoa = new JButton("Cancel");
        bang_nhan = new JPanel();
        bang_dai = new JPanel();
        bang_nut = new JPanel();

        nut_ok.setPreferredSize(new Dimension(80, 30));
        nut_xoa.setPreferredSize(new Dimension(80, 30));

        bang_nhan.add(nhan_tai_khoan);
        bang_nhan.add(nhan_mat_khau);
        bang_dai.add(dai_tai_khoan);
        bang_dai.add(dai_mat_khau);
        bang_nut.add(nut_ok);
        bang_nut.add(nut_xoa);

        add(bang_nhan);
        add(bang_dai);
        add(bang_nut);

        setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
        setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        setVisible(true);
        setModal(true);
        pack();
        setLocationRelativeTo(getParent());
    }
}
